import { useSelector } from 'react-redux'
import { userInfoType, stateType } from '@/types'

const useGetUserInfo = () => {
  const { username, nickname } = useSelector<stateType>(state => state.user) as userInfoType
  return { username, nickname }
}

export default useGetUserInfo
